const { Writable } = require('stream')

class MyWriteable extends Writable{
  constructor(){
    super()
  }
  _write(chunk,en,done){
    process.stdout.write(chunk.toString()+'<----')
    process.nextTick(done)
  }
}

let myWs = new MyWriteable()

myWs.write('aabbcc', 'utf-8', ()=>{
  console.log('end')
})
// aabbcc<----end
